# Beware that the quotes around the values are mandatory

from datetime import timedelta
# Set the time after which the session expires
PERMANENT_SESSION_LIFETIME = timedelta(hours=24)


### Secret key for the Flask application
SECRET_KEY='{{ anitya_secret_key }}'

### url to the database server:
#DB_URL=mysql://user:pass@host/db_name
#DB_URL=postgres://user:pass@host/db_name
DB_URL='postgresql://{{ anitya_db_user }}:{{ anitya_db_pass }}@{{ anitya_db_host }}/{{ anitya_db_name }}'

# List of admins based on their openid
ANITYA_WEB_ADMINS = [
    'http://ralph.id.fedoraproject.org/',
    'http://pingou.id.fedoraproject.org/',
    'http://jcline.id.fedoraproject.org/',
    'http://tibbs.id.fedoraproject.org/',
]

# Email addresses to send tracebacks to when an HTTP 500 occurs
ADMIN_EMAIL = [
    'admin@fedoraproject.org',
    'jeremy@jcline.org',
]

# Fedora OpenID endpoint
{% if env == 'staging' %}
ANITYA_WEB_FEDORA_OPENID = 'https://id.stg.fedoraproject.org'
{% else %}
ANITYA_WEB_FEDORA_OPENID = 'https://id.fedoraproject.org'
{% endif %}

ANITYA_WEB_ALLOW_GOOGLE_OPENID = False

# This is required to fix login
PREFERRED_URL_SCHEME='https'
# Make browsers send session cookie only via HTTPS
SESSION_COOKIE_SECURE=True
